package com.woniuxy.car.commodity.service.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author awz
 * @since 2022-03-01
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("kc_commodity")
@ApiModel(value = "Commodity对象", description = "商品表")
public class Commodity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商品标题")
    private String title;

    @ApiModelProperty("商品名")
    private String name;

    @ApiModelProperty("商品类别id")
    private Integer classId;

    @ApiModelProperty("是否到店安装0为不到店，1为到店)")
    private Integer toShop;

    @ApiModelProperty("商品图片")
    private String pic;

    @ApiModelProperty("商品视频")
    private String video;

    @ApiModelProperty("商品价格")
    private BigDecimal price;

    @ApiModelProperty("商品库存")
    private Integer stock;

    @ApiModelProperty("商品活动价")
    private BigDecimal promotionPrice;

    @ApiModelProperty("店铺id")
    private Integer shopId;

    @ApiModelProperty("商品标签（json格式）")
    private String label;

    @ApiModelProperty("限购数量（0为不限购）")
    private Integer limitCount;

    @ApiModelProperty("是否是次日达")
    private Integer nextDayAir;

    @ApiModelProperty("上架时间")
    private LocalDateTime groundingTime;

    @ApiModelProperty("下架时间")
    private LocalDateTime downTime;

    @ApiModelProperty("商品状态（上架1，下架0）")
    private Integer grounding;

    @ApiModelProperty("是否是正品自营")
    private Integer certified;

    @TableField(select = false)
    @TableLogic
    @ApiModelProperty("逻辑删除(0未删除，1已删除)")
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("创建人id")
    private Integer creator;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("修改人id")
    private Integer updator;

    @ApiModelProperty("综合排序数")
    private BigDecimal synthesize;

    @ApiModelProperty("销量")
    private Integer saleNum;

    @ApiModelProperty("运费")
    private BigDecimal freight;

    @ApiModelProperty("商品评价标签")
    private String commentLabel;

}
